import request from '@common/utils/request';
export function getList(data) {
  return request({
    url: '/worker/list',
    method: 'post',
    data,
  });
}
export function add(data) {
  return request({
    url: '/worker/create',
    method: 'post',
    data,
  });
}
export function queryNoSign(data) {
  return request({
    url: '/worker/queryNoSign',
    method: 'post',
    data,
  });
}
export function remove(Id) {
  return request({
    url: '/worker/deleteById',
    method: 'post',
    data: {
      Id,
    },
  });
}
// update
export function update(data) {
  return request({
    url: '/worker/update',
    method: 'post',
    data,
  });
}
export function send(data) {
  return request({
    url: '/send/create',
    method: 'post',
    data,
  });
}
export function sendBack(data) {
  return request({
    url: '/worker/sendBack',
    method: 'post',
    data,
  });
}
export function getDetail(data) {
  return request({
    url: '/worker/detail',
    method: 'post',
    data,
  });
}

export function createContracts(data) {
  return request({
    url: '/worker/createContracts',
    method: 'post',
    data,
  });
}
export function getStaticsData(data) {
  return request({
    url: '/worker/statics',
    method: 'post',
    data,
  });
}

export function getStatusStatistics(data) {
  return request({
    url: '/worker/statistics/byStatus',
    method: 'get',
    data,
  });
}

// 取消工人合同
export function cancelFlow(data) {
  return request({
    url: '/worker/cancelFlow',
    method: 'post',
    data,
  });
}
// 彻底删除工人信息
export function cleanUser(data) {
  return request({
    url: '/worker/clean',
    method: 'post',
    data,
  });
}
// 终止工人合同
export function stopFlow(data) {
  return request({
    url: '/worker/stopFlow',
    method: 'post',
    data,
  });
}
export function getWorkerTenants(data) {
  return request({
    url: '/worker/getTenants',
    method: 'post',
    data,
  });
}
export function getProposalContracts(data) {
  return request({
    url: '/worker/getProposalContracts',
    method: 'post',
    data,
  });
}
